package Factory;
import Model.*;
import Cloth.*;

/**
 * 工厂模式生成对应天气的衣服，由传入的数字控制种类
 */
public class ClothFactory {
    public Cloth createCloth(int opt){
        Cloth cloth = null;
        switch (opt){
            case 1:
                cloth = new HotCloth();
                break;
            case 2:
                cloth = new ColdCloth();
                break;

        }
        return cloth;
    }
}
